<!-- BEGIN: list -->
<script type="text/javascript">
function showInfoToForm(id, urlAjax){
	$.ajax({
			url	:urlAjax,
			type:'POST',
			data:{id:""+id+""},
			dataType:'json',
			beforeSend:function(){
				$("#ajax-loader").show();
			},
			success:function(msg){
				$("#ajax-loader").hide();
				if(msg){
					$("#tdCategies").html(msg.sltcategory);
					$("input[name='category_name']").val(msg.category_name);
					$("input[name='modeform']").val(1);
					$("input[name='id']").val(id);
					$('#group-button').html("<input type='button' value='Xóa' id='btn-delete' onclick='onDelSignle("+id+", \"category\")' class='button'/>");
				}
				
			}
		});
}
</script>
<div id="main-left">
	<div class="menu">
		<h2>Các danh mục</h2>
	</div>
	<div id="sidetreecontrol"><a href="?#">Đóng tất cả</a> | <a href="?#">Mở tất cả</a></div>
	{tree}
</div>

<div id="content">
	<form <form enctype="multipart/form-data" method="post" name="frm">
		<div class="content-header h_title">
			<h2>Thêm danh mục sản phẩm</h2>
			<div class="content-buttons">
				<input type="button" value="Reset" class="button" onclick="window.location.href='?c=category&a=list'" />
				<input type="submit" value="Lưu" class="button" id="sumit-form" />
				<div id="group-button">
				
				</div>
			</div>
			<div class="clr"></div>
		</div>
		<table class="form-list" cellspacing="0">
			<tbody>
				<tr>
					<td class="label">
						<label for="parent_id">Danh mục cha<span class="required">*</span></label>
					</td>
					<td class="value" id="tdCategies">
						{sltCategory}
					</td>
				</tr>
				<tr>
					<td class="label">
						<label for="category_name">Tên danh mục<span class="required">*</span></label>
					</td>
					<td class="value">
						<input type="text" name="category_name" class="input-text input-text-medium" />
						<input type="hidden" name="modeform" value="" />
						<input type="hidden" name="id" value="" />
					</td>
				</tr>
			</tbody>
		</table>
		<ul class="list-error">
			{error}
		</ul>
	</form>
</div>
<!-- END: list -->